/*
 * Copyright Iain Sproat, 2008
 * 
 *
 */
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace FreeBase.Domain
{
	/// <summary>
	/// This is a basic Freebase entity
	/// Value Types, Topic Types, Images, Documents and Properties seem to be derived from this
	/// </summary>
	[JsonObject(MemberSerialization.OptIn)]
	public class FBObject
	{
		public FBObject(){
		}
		public FBObject(string name){
			this.Name =  name;
		}
		
		[JsonProperty("name")]
		[JsonConverter(typeof(ValueTypeConvertor<FBText>))]
		public FBText Name{ get; set; }
		public IList<FBKey> Key{ get; set; }
		
		[JsonProperty("id")]
		[JsonConverter(typeof(ValueTypeConvertor<FBId>))]
		public FBId Id{ get; set; }
		public FBType Type{ get; set; }
		public string TimeStamp{ get; set; }
		public FBUser Creator{ get; set; }
		public FBPermission Permission{ get; set; }
		public FBId Guid{ get; set; }
		
		//FIXME - does the LName exist here?
		public IList<string> LName{ get; set; }
	}
}
